<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>fof管理平台 - 登录</title>
    <meta name="keywords" content="fof管理平台">
    <meta name="description" content="fof管理平台">

    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="${base!}/static/admin/js/lib/bootstrap/bootstrap.css">
    <link rel="stylesheet" href="${base!}/static/admin/css/animate/animate.css">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <script>
    if (window.top !== window.self) {
        window.top.location = window.location;
    }
    </script>
    <style type="text/css">
        .gray-bg {
            background-color: #f3f3f4;
        }
        .loginscreen.middle-box {
            width:300px;
            max-width: 400px;
            z-index: 100;
            margin: 0 auto;
            padding-top: 40px;
            background-color: transparent;
        }
        .loginColumns {
            max-width:800px;
            margin:0 auto;
            padding:100px 20px 20px
        }
        .full-width{
            width:100%;
        }
        .btn {
            background-color: #18a689;
            border-color: #18a689;
            color: #FFF;
            margin-bottom: 15px;
        }
        .btn:hover,.btn:active,.btn:visited{
            background-color: #18a689;
            border-color: #18a689;
        }
        input{
            border-radius:0!important;
        }
        input:focus{
            border-color: #1ab394!important;
        }
        #background{
            position: absolute;
            height: 100%;
            width: 100%;
            z-index: -1;
        }
        .logo-name{
            font-size: 170px;
            color: #e6e6e6;
            font-weight: 800;
            letter-spacing: -10px;
            margin-bottom: 0;
        }
    </style>
</head>

<body class="gray-bg">
<canvas id="background"></canvas>
<div class="middle-box text-center loginscreen animated fadeInDown">
    <div>
        <div>

            <h1 class="logo-name">FOF</h1>

        </div>
        <h3>欢迎使用 fof管理平台</h3>

        <form class="m-t" role="form" action="index.html">
            <div class="form-group">
                <input id="userName" type="text" class="form-control" placeholder="用户名" required="">
            </div>
            <div class="form-group">
                <input id="password" type="password" class="form-control" placeholder="密码" required="">
            </div>
            <button type="button" id="loginBtn" class="btn btn-primary block full-width m-b">登 录</button>


            <p class="text-muted text-center"><a href="login.html#">
                <small>忘记密码了？</small>
            </a> | <a href="register.html">注册一个新账号</a>
            </p>

        </form>
    </div>
</div>
<script src="${base!}/static/admin/js/lib/jquery/jquery-2.2.3.min.js"></script>
<script src="${base!}/static/admin/js/lib/bootstrap/bootstrap.js"></script>
<script src="${base!}/static/admin/js/lib/background/background.js"></script>
<script type="text/javascript">
    $(function () {
        $("#loginBtn").click(function(){
            var userName = $("#userName").val();
            var password = $("#password").val();
            $.ajax({
                url:'${base!}/private/doLogin',
                data:{
                    userName:userName,
                    password:password,
                },
                method:"post",
                success:function(data){
                    if(data.code == 200){
                        window.location='${base!}/private/home';
                    }else{
                        alert("账号密码不匹配");
                    }

                },
                error:function(){
                    alert("系统故障，请联系QQ:562470201");
                }
            })
        });
    });
</script>
</body>

</html>
